#define _CRT_SECURE_NO_WARNINGS 1
#include <string>
#include <vector>
using namespace std;
class Solution {
public:
    string restoreString(string s, vector<int>& indices)
    {
        string ret(s.size(), 0);
        for (int i = 0;i < s.size();i++)
        {
            ret[indices[i]] = s[i];
        }
        return ret;
    }
};